package com.xujl.mvcbind.ui.form.model;

import com.xujl.fastlib.base.BaseModel;
import com.xujl.fastlib.base.IControl;
import com.xujl.mvcbind.bean.UserInfoBean;
import com.xujl.mvcbind.repository.DataRepository;


/**
 * <pre>
 *     author : xujl
 *     e-mail : 597355068@qq.com
 *     time   : 2019/08/20
 *     desc   :
 *     version: 1.0
 * </pre>
 */

public class UserInfoFragmentModel extends BaseModel {
    private UserInfoBean mUserInfoBean = new UserInfoBean();


    @Override
    public void init (IControl control) {

    }

    public UserInfoBean getUserInfoBean () {
        UserInfoBean userInfoBean = DataRepository.getInstance().getUserInfo();
        if (userInfoBean != null) {
            mUserInfoBean = userInfoBean;
        }
        return mUserInfoBean;
    }

    public void saveUserInfo () {
        DataRepository.getInstance().saveUserInfo(mUserInfoBean);
    }

}
